import Vue from 'vue'
import Router from 'vue-router'
import Home from "@/components/Home";
import Login from '@/components/Login'
import Register from "../components/Register";
import Courses from "../components/Courses";
import Detail from "../components/Detail";
import Aliplayer from "../components/Aliplayer";
import Cart from "../components/Cart";
import Order from "../components/Order";

Vue.use(Router);

export default new Router({
  mode: 'history',
  routes: [
    {
      name: "Home",
      path: '/',
      component: Home
    },
    {
      name: "Home",
      path: '/home',
      component: Home
    },
    {
      name: "Login",
      path: '/login',
      component: Login
    },
    {
      name: "Register",
      path: '/register',
      component: Register
    },
    {
      name: "Courses",
      path: '/courses',
      component: Courses
    },
    {
      name: "Detail",
      path: '/courses/:course',
      component: Detail
    },
    {
      name: "Aliplayer",
      path: '/aliplayer',
      component: Aliplayer
    },
    {
      path: '/cart',
      name: 'Cart',
      component: Cart,
    },
    {
      path: '/buy',
      name: 'order',
      component: Order,
    },
  ]
})
